<?php
/**
 * SocialEngine
 *
 * @category   Application_Extensions
 * @package    Vote
 * @copyright  Copyright 2011 KEENONWEB LLC
 * @license    http://www.keenonweb.com/
 * @version    $Id: index.tpl 2011-03-09 01:11:30 idris $
 * @author     Idris
 */
?>

<script type="text/javascript">
en4.core.runonce.add(function(){
  var options = {
    guid: '<?php echo $this->subject->getGuid(); ?>',
    allowedEdit: <?php echo (int)$this->allowedEdit; ?>,
    defaultText: '<?php echo $this->defaultText; ?>'
  };
  var kowcoreNote = new en4.kowcore.note(options);
});
</script>

<div class="kowcore-note">

  <?php if ($this->allowedEdit): ?>
    <textarea class="kowcore-note-textarea hidden" id="kowcore-note-textarea"></textarea>
  <?php endif; ?>

  <div class="kowcore-note-text" id="kowcore-note-container">
    <div class="value defaultText" id="kowcore-note-value"><?php echo $this->noteText; ?></div>
    <?php if ($this->allowedEdit): ?>
      <a href='javascript:void(0)' class='kowcore-note-edit-link' id='kowcore-note-edit-link'></a>
    <?php endif; ?>
  </div>

</div>